package com.oglvip.business.util;

import org.apache.commons.lang3.StringUtils;

import java.util.TreeMap;

/**
 * @auther hanchao
 * @date 2017/2/11 21:26
 */
public class SignUtil {
    public static final String SEC_KEY = "lifeshop";

    public static String getSign(TreeMap<String,Object> params){
        String str = "";
        for (String param : params.keySet()) {
            if(!StringUtils.equals(param, "key")){
                str += (param + "=" + params.get(param));
            }
        }
        str += SEC_KEY;
        return EncryptUtil.md5Encrypt(str);
    }
}
